﻿using System.IO;
using Antlr.Runtime;

namespace USU.MetricsMonitor.DiffParser
{
	public class DiffParser
	{
		/// <summary>
		/// This method is used to parse the diff with given reader and diff processor
		/// which will receive diff parse events and data from diff
		/// </summary>
		/// <param name="diffReader">Reader from which the diff will be read</param>
		/// <param name="diffProcessor">Processor which will react on event and collect
		/// diff data</param>
		public static void Parse(TextReader diffReader, DiffProcessor diffProcessor, string whiteList, string blackList)
		{
			new global::DiffParser.impl.diffParser(new CommonTokenStream (new diffLexer(new ANTLRReaderStream(diffReader))), diffProcessor).diff();
		}
	}
}